<!DOCTYPE html>
<html lang="zh-cn" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta http-equiv="x-rim-auto-match" content="none">
<title>真性情，不装逼，这里有你要找的一切</title>
<link rel="stylesheet" href="css/base.css" type="text/css"/>
</head>

<body class="body-bg">
	<img src="images/share_icon.png" width="300" height="300" class="share-icon"/>
	<img src="images/icon.png" width="77" height="78" class="logo-img animate" />
	<div class="slogan">
		<span class="wz_0 animate">不</span>
		<span class="wz_1 animate">装</span>
		<span class="wz_2 animate">逼</span>
		<span class="wz_3 animate">/</span>
		<span class="wz_4 animate">不</span>
		<span class="wz_5 animate">炫</span>
		<span class="wz_6 animate">富</span>
		<span class="wz_7 animate">/</span>
		<span class="wz_8 animate">有</span>
		<span class="wz_9 animate">态</span>
		<span class="wz_10 animate">度</span>
		<span class="wz_11 animate">/</span>
		<span class="wz_12 animate">做</span>
		<span class="wz_13 animate">自</span>
		<span class="wz_14 animate">已</span>
	</div>
	<!--<a href="mrht://home.index" class="download-btn" id="download-btn"><img src="images/btn.png" width="192" height="42" /></a>-->
	<a href="javascript:;" class="download-btn" id="download-btn"><img src="images/btn.png" width="192" height="42" /></a>
	<div class="foot-btn">
		<p class="copyright">上海云活科技有限公司 版权所有 Powered by © 2016-2018 WWW.HAITAI.TV </p>
	</div>
	<div class="wx-tip dn" id="wxTip"><img src="images/download_tip.png" width="266" /></div>
<script src="zepto.min.js"></script>
<script>
	var androidUrl = '';

	function browserType(){
		var userAgent=navigator.userAgent.toLowerCase();
		if(userAgent.indexOf('android')>-1&& userAgent.indexOf('linux')>-1){
			return 'android';
		}else if(userAgent.indexOf('iphone')>-1){
			return 'iphone';
		}else{
			return false;
		}
	}
	window.onload = function(){
		document.body.className = 'body-bg active';
		var linkA = document.getElementById('download-btn');
		$.ajax({
			url : 'http://api.haitai.huo.so/hitgou/config?os=0',
			dataType : 'jsonp',
			success : function(json){
				androidUrl = json.data.version.url;
				linkA.href = androidUrl;
//				if(browserType() == 'android'){
//					function applink(){
//						return function(){
//							var clickedAt = +new Date;
//							setTimeout(function(){
//								!window.document.webkitHidden && setTimeout(function(){
//									if (+new Date - clickedAt < 2000){
//										//window.location = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.cloudlife.mrht';
//										window.location = androidUrl;
//									}
//								}, 500);
//							}, 500)
//						};
//					}
//					linkA.onclick = applink();
//					//linkA.href = 'xbl://home.index';
//				}
				if(browserType() == 'iphone'){
					//linkA.href = 'https://itunes.apple.com/cn/app/xiang-ba-la-zi-xun/id1071744646?mt=8';
					//linkA.href = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.cloudlife.mrht';
					linkA.href = 'itms-services://?action=download-manifest&url=https://prod02.huo.so/app/haitai/ios/0.6.0/download.plist';
				};
			}
		});
	};
	//是否微信
	function isWeiXin(){
		var ua = window.navigator.userAgent.toLowerCase();
		if(ua.match(/MicroMessenger/i) == 'micromessenger'){
			return true;
		}else{
			return false;
		}
	}

	$('#download-btn').click(function(e){
		if(isWeiXin()){
			$('#wxTip').show();
			e.preventDefault();
		};
	});
	$('#wxTip').click(function(){
		$(this).hide();
	});
</script>
</body>
</html>
